package com.k.activemq.openwire_sync1.listener;

import javax.jms.Message;
import javax.jms.MessageConsumer;
import java.util.concurrent.Callable;

public class CustomConsumerCallable implements Callable<Message> {
    private MessageConsumer consumer;
    public CustomConsumerCallable(MessageConsumer consumer){
        this.consumer = consumer;
    }
    @Override
    public Message call() throws Exception {
        return consumer.receive();
    }
}
